<template>

  <div class="head">
    <input v-model="msg" type="text" name="" id="">
    <button @click="add">添加</button>
  </div>

  <child :data="data"></child>



</template>

<script setup>
import child from './child.vue'
import { ref } from 'vue'
const msg = ref('')
const data = ref('')
const add = () => {
  data.value = msg.vue
}


</script>

<style lang="css" scoped></style>